<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <title></title>
        <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
        <link rel="stylesheet" type="text/css" href="../css/config.css" />
        <script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="../js/config.js" type="text/javascript" charset="utf-8"></script>
        <script src="../js/jquery-1.8.3.min.js" type="text/javascript"></script>
        <style type="text/css">
            body,
            html {
                height: 100%;
                color: #222;
            }
            
            * {
                line-height: 1;
            }
            
            .mui-content {
                background-color: #FFFFFF;
            }
            
            .flex_row {
                padding: 0;
            }
            
            .flex_1 {
                text-align: left;
            }
            
            .content-body {
                position: absolute;
                top: 0;
                bottom: 0;
                width: 100%;
                text-align: left;
            }
            
            .top-info {
                background-color: #FFFFFF;
                padding: 0.4rem 0.3rem 0;
            }
            
            .title {
                color: #222;
                font-size: 0.38rem;
            }
            
            .title_ {
                display: none;
                align-content: center;
                font-size: 0.28rem;
                padding: 0.2rem 0 0.28rem;
            }
            
            .title_ img {
                width: 0.4rem;
                height: 0.4rem;
                margin-right: 0.1rem;
            }
            
            .list-row {
                padding: 0.3rem 0.3rem 0;
                border-bottom: 0.01rem solid #F3F3F3;
            }
            
            .top-content {
                font-size: 0.28rem;
                color: #999999
            }
            
            .content-title {
                font-size: 0.34rem;
                padding: 0.1rem 0 0.4rem;
            }
            
            .content-row {
                padding-bottom: 0.2rem;
            }
            
            .content-L {
                padding-right: 0.1rem;
            }
            /*下部内容*/
            
            .under-content {
                background-color: #FFFFFF;
                position: relative;
                font-size: 0.28rem;
            }
            
            .tab-top {
                display: none;
                white-space: nowrap;
                padding: 0 0.3rem;
                border-bottom: 0.01rem solid #F3F3F3;
                overflow-x: auto;
                overflow-y: hidden;
            }
            
            .tab-top>div {
                display: inline-block;
                height: 1rem;
                line-height: 1rem;
                margin-right: 0.54rem;
                position: relative;
            }
            
            .tab-top>div:last-child {
                margin-right: 0;
            }
            
            .tab-top>.selected:after {
                content: '';
                position: absolute;
                bottom: 0;
                left: 0;
                height: 2px;
                width: 100%;
                background-color: #45A4FC;
            }
            
            .every-div {
                position: relative;
                display: none;
            }
            
            .total-row {
                border-bottom: 0.01rem solid #F3F3F3;
                padding: 0.3rem;
            }
            
            .total-num {
                color: #999999;
            }
            
            .total-type {
                position: relative;
                padding-right: 15px;
                display: none;
            }
            
            .total-type:after {
                content: '';
                display: block;
                position: absolute;
                top: 50%;
                margin-top: -3px;
                right: -2px;
                border-top: 6px solid #222222;
                border-right: 6px solid transparent;
                border-left: 6px solid transparent;
                /*border-bottom: 4px solid violet;*/
            }
            /*左部份选择*/
            
            .under-L {
                width: 0;
                border-right: 0.01rem solid #F3F3F3;
                text-align: center;
                overflow-y: auto;
            }
            
            .under-L div {
                padding: 0.28rem 0;
                border-bottom: 0.01rem solid #F3F3F3;
            }
            
            .under-L div:last-child {
                border: none;
            }
            
            .under-L div.selected {
                background-color: #45A4FC;
                color: #FFFFFF;
            }
            
            .under-R {
                overflow-y: auto;
            }
            
            .mask {
                display: none;
                position: absolute;
                top: 0;
                bottom: 0;
                width: 100%;
                background: rgba(0, 0, 0, 0.5);
                z-index: 10;
            }
            
            .mask>.mask_list {
                height: 4.6rem;
                overflow-y: scroll;
            }
            
            .mask>.mask_list>div {
                background-color: #FFFFFF;
                padding: 0.3rem;
                border-bottom: 0.01rem solid #F3F3F3;
            }
            
            .loadingWait {
                text-align: center;
                padding: 3rem 0;
                color: #999999;
                margin: 0;
                background-image: url(../images/little-loading.gif);
                background-repeat: no-repeat;
                background-position: center 2.5rem;
                background-size: 0.4rem;
            }
            
            .no-mwait {
                text-align: center;
                padding: 3rem 0;
                color: #999999;
                margin: 0;
            }
            
            .mwait {
                text-align: center;
                padding: 0.2rem 0;
                background-color: #FFFFFF;
                color: #999999;
                margin: 0;
            }
        </style>
    </head>

    <body>
        <!--我的公司-->
        <div class="mui-navbar-inner mui-bar mui-bar-nav">
            <h1 class="mui-center mui-title mui-ellipsis company_name">公司详情</h1>
        </div>
        <div class="mui-content content-body ">
            <div class="top-info">
                <div class="title" id="gs_name"></div>
                <div class="title_ flex_row">
                    <img src="../images/wst.png" />
                    <span id="gs_rz"></span>
                </div>
                <!--基本信息-->
                <div class="top-content" id="gs_info"></div>
            </div>
            <div style="height: 0.2rem;background-color: #efeff4;"></div>
            <div class="flex_1 under-content flex_col" id="underContent">
                <div class="tab-top" id="tabTop">
                    <div data-urlT='/index/Company_new/zzicon' data-urlL='/index/Company_new/zzNav' data-urlR='/index/Company_new/zz_list' data-type="企业资质" data-id="zz_div" class="selected">企业资质</div>
                    <div data-urlT='/index/Company_new/peopleSource' data-urlL='/index/Company_new/peopleNav' data-urlR='/index/Company_new/peopleList' data-type="企业人员" data-id="ry_div">企业人员</div>
                    <div data-urlR="/index/Company_new/building_yj" data-type="在建项目" data-id="zj_div">在建项目</div>
                    <div data-urlT="/index/Company_new/performanceCount" data-urlL="/index/Company_new/performanceNav" data-urlR="/index/Company_new/performanceList" data-type="业绩信息" data-id="yj_div">业绩信息</div>
                    <div data-urlR="/index/Company_new/bidPerformanceList" data-type="中标业绩" data-id="zb_div">中标业绩</div>
                    <div data-urlR="/index/Company_new/tbPerformanceList" data-type="企业使用业绩" data-id="syyj_div">企业使用业绩</div>
                    <div data-type="良好/不良记录" data-id="lhbl_div">良好/不良记录</div>
                    <div data-type="信用排名" data-id="xy_div">信用排名</div>
                </div>
                <div class="flex_1 flex_row" id="all_divs">
                    <!--资质-->
                    <div data-page="1" class="flex_1 flex_col every-div" style="display: flex;" id="zz_div">
                        <div class="mask" id="zz_mask">
                            <div class="mask_list"></div>
                        </div>
                        <div class="flex_row total-row">
                            <div class="flex_1 total-num" id="zz_count"></div>
                            <div data-type="zz_mask" class="total-type" id="zz_ly"></div>
                        </div>
                        <div class="flex_1 flex_row">
                            <div class="under-L" id="underL_zz"></div>
                            <div class="flex_1 under-R" data-type="企业资质" onscroll="scroll_fn(this)">
                                <div class="under-R-list"></div>
                                <p class="loadingWait wait-text">正在努力加载中...</p>
                            </div>
                        </div>
                    </div>
                    <!--人员-->
                    <div data-page="1" class="flex_1 flex_col every-div" id="ry_div">
                        <div class="mask" id="ry_mask">
                            <div class="mask_list"></div>
                        </div>
                        <div class="flex_row total-row">
                            <div class="flex_1 total-num"></div>
                            <div data-type="ry_mask" class="total-type"></div>
                        </div>
                        <div class="flex_1 flex_row">
                            <div class="under-L" id="underL_ry"></div>
                            <div class="flex_1 under-R" data-type="企业人员" onscroll="scroll_fn(this)">
                                <div class="under-R-list"></div>
                                <p class="loadingWait wait-text">正在努力加载中...</p>
                            </div>
                        </div>
                    </div>
                    <!--在建业绩-->
                    <div data-page="1" class="flex_1 flex_col every-div" id="zj_div">
                        <div class="mask" id="zj_mask">
                            <div class="mask_list">
                                <div>在建四川建设厅在建 <span>(99条)</span></div>
                                <div>四川建设厅 <span>(99条)</span></div>
                            </div>
                        </div>
                        <div class="flex_row total-row">
                            <div class="flex_1 total-num">33条</div>
                            <div data-type="zj_mask" class="total-type">在建四川建设厅</div>
                        </div>
                        <div class="flex_1 flex_row">
                            <div class="flex_1 under-R" data-type="在建业绩" onscroll="scroll_fn(this)">
                                <div class="under-R-list"></div>
                                <p class="loadingWait wait-text">正在努力加载中...</p>
                            </div>
                        </div>
                    </div>
                    <!--业绩信息-->
                    <div data-page="1" class="flex_1 flex_col every-div" id="yj_div">
                        <div class="mask" id="yj_mask">
                            <div class="mask_list"></div>
                        </div>
                        <div class="flex_row total-row">
                            <div class="flex_1 total-num"></div>
                            <div data-type="yj_mask" class="total-type"></div>
                        </div>
                        <div class="flex_1 flex_row">
                            <div class="under-L"></div>
                            <div class="flex_1 under-R" data-type="业绩信息" onscroll="scroll_fn(this)">
                                <div class="under-R-list"></div>
                                <p class="loadingWait wait-text">正在努力加载中...</p>
                            </div>
                        </div>
                    </div>
                    <!--中标业绩-->
                    <div data-page="1" class="flex_1 flex_col every-div" id="zb_div">
                        <div class="flex_row total-row">
                            <div class="flex_1 total-num"></div>
                        </div>
                        <div class="flex_1 flex_row">
                            <div class="flex_1 under-R" data-type="中标业绩" onscroll="scroll_fn(this)">
                                <div class="under-R-list"></div>
                                <p class="loadingWait wait-text">正在努力加载中...</p>
                            </div>
                        </div>
                    </div>
                    <!--企业使用业绩-->
                    <div data-page="1" class="flex_1 flex_col every-div" id="syyj_div">
                        <div class="flex_row total-row">
                            <div class="flex_1 total-num"></div>
                        </div>
                        <div class="flex_1 flex_row">
                            <div class="flex_1 under-R" data-type="企业使用业绩" onscroll="scroll_fn(this)">
                                <div class="under-R-list"></div>
                                <p class="loadingWait wait-text">正在努力加载中...</p>
                            </div>
                        </div>
                    </div>
                    <!--良好/不良记录-->
                    <div data-page="1" class="flex_1 flex_col every-div" id="lhbl_div">
                        <div class="mask" id="lhbl_mask">
                            <div class="mask_list">
                                <div>良好业绩四川建设厅人员 <span>(99条)</span></div>
                                <div>四川建设厅 <span>(99条)</span></div>
                            </div>
                        </div>
                        <div class="flex_row total-row">
                            <div class="flex_1 total-num">33</div>
                            <div data-type="lhbl_mask" class="total-type">人员四川建设厅</div>
                        </div>
                        <div class="flex_1 flex_row">
                            <div class="under-L" id="underL_lhbl">
                                <div data-type="房屋建筑" class="selected">良好</div>
                                <div data-type="市政工程">市政工程</div>
                            </div>
                            <div class="flex_1 under-R" data-type="良好不良" onscroll="scroll_fn(this)">
                                <div class="under-R-list">
                                    <div class="list-row">
                                        <div class="content-title">中标业绩</div>
                                        <div class="top-content">
                                            <div class="content-row flex_row">
                                                <div class="content-L">企业法人代表:</div>
                                                <div class="flex_1">小时</div>
                                            </div>
                                            <div class="content-row flex_row">
                                                <div class="content-L">企业法人代表:</div>
                                                <div class="flex_1">到达</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <p class="loadingWait wait-text">正在努力加载中...</p>
                            </div>
                        </div>
                    </div>
                    <!--信用排名-->
                    <div data-page="1" class="flex_1 flex_col every-div" id="xy_div">
                        <div class="mask" id="xy_mask">
                            <div class="mask_list">
                                <div>信用四川建设厅在建 <span>(99条)</span></div>
                                <div>四川建设厅 <span>(99条)</span></div>
                            </div>
                        </div>
                        <div class="flex_row total-row">
                            <div class="flex_1 total-num">33条</div>
                            <div data-type="xy_mask" class="total-type">在建四川建设厅</div>
                        </div>
                        <div class="flex_1 flex_row">
                            <div class="flex_1 under-R" data-type="信用排名" onscroll="scroll_fn(this)">
                                <div class="under-R-list">
                                    <div class="list-row">
                                        <div class="content-title">中标业绩</div>
                                        <div class="top-content">
                                            <div class="content-row flex_row">
                                                <div class="content-L">企业法人代表:</div>
                                                <div class="flex_1">小时</div>
                                            </div>
                                            <div class="content-row flex_row">
                                                <div class="content-L">企业法人代表:</div>
                                                <div class="flex_1">到达</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <p class="loadingWait wait-text">正在努力加载中...</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            //状态属性
            var vars = {
                gs_id: 5800,
                token: 111,
                selected_div: '#zz_div',
                ajax_url_T: '/index/Company_new/zzicon', //个数统计
                ajax_url_L: '/index/Company_new/zzNav', //类型
                ajax_url_R: '/index/Company_new/zz_list', //列表
                ajax_R_pass: true, //防止重复添加相同页数
            }
            document.addEventListener('plusready', function() {

                mui('#share_btn')[0].addEventListener('tap', function() {
                    simple_share('www.baidu.com','人员证件','CoC专注建筑行业大数据分析')
                })
            })
            window.onload = function(e) {
                //              var self_web = plus.webview.currentWebview();
                //              vars.gs_id = self_web.cid;
                //              console.log(vars.gs_id)
                var title_h = mui('.mui-navbar-inner')[0].offsetHeight;
                mui('#underContent')[0].style.height = window.innerHeight - title_h - 100 + 'px'
                //获取基本信息
                ajax_fn('/index/Company_new/company_info', {
                    gs_id: vars.gs_id,
                    token: vars.token
                }, function(backData) {
                    if(backData.status == 'success') {
                        mui('#tabTop')[0].style.display = 'block';
                        mui('.under-L')[0].style.width = '2.4rem';
                        var datas = backData.result;
                        mui('#gs_name')[0].innerText = datas.name;
                        mui('#gs_rz')[0].parentNode.style.display = 'flex';
                        mui('#gs_rz')[0].innerText = datas.rz;
                        var lists = '';
                        mui.each(datas.rows, function(i, v) {
                            if(v.value.length > 60) {
                                var substring = v.value.substring(0, 50);
                                var texts = substring + '... <span onclick="toggle_text(this)" data-subText="' + substring + '" data-allText="' + v.value + '" class="all-text" style="color:#45a4fc">全文</span>';
                                lists += '<div class="content-row flex_row">' +
                                    '<div class="content-L">' + v.name + ':</div>' +
                                    '<div class="flex_1">' + texts + '</div>' +
                                    '</div>'
                            } else {
                                lists += '<div class="content-row flex_row">' +
                                    '<div class="content-L">' + v.name + ':</div>' +
                                    '<div class="flex_1">' + v.value + '</div>' +
                                    '</div>'
                            }
                        })
                        mui('#gs_info')[0].innerHTML = lists
                    }
                })
                //获取资质统计信息
                ajax_T(function(backData) {
                    ajax_L(function(backData2) {
                        ajax_R()
                    })
                })
            }

            //点击切换大类
            mui('#tabTop').on('tap', 'div', function() {
                var under_type = this.getAttribute('data-type');
                var show_div = this.getAttribute('data-id');
                vars.selected_div = '#' + show_div;
                vars.ajax_url_T = this.getAttribute('data-urlt');
                vars.ajax_url_L = this.getAttribute('data-urll');
                vars.ajax_url_R = this.getAttribute('data-urlr');
                add_remove_class(mui('#tabTop div'), under_type);
                hied_show_div(mui('.every-div'), show_div);
                var is_data = mui(vars.selected_div + ' .under-R .list-row')
                if(is_data.length == 0) {
                    if(under_type == '在建项目' || under_type == '中标业绩') {
                        ajax_R()
                    } else {
                        ajax_T(function() {
                            ajax_L(function() {
                                ajax_R()
                            })
                        })
                    }
                }
            })
            //点击切换左部类型
            mui('.under-L').on('tap', 'div', function() {
                var selected_ = this.className;
                if(!selected_) {
                    //重置
                    init_fn();
                    var under_type = this.getAttribute('data-type');
                    mui(vars.selected_div)[0].setAttribute('data-name', under_type);
                    //请求列表
                    ajax_R();
                    //添加选中状态
                    var parentId = this.parentNode.id;
                    add_remove_class(mui('#' + parentId + ' div'), under_type);
                }
            })
            //点击显示蒙层
            mui('#all_divs').on('tap', '.total-type', function() {
                var mask_id = this.getAttribute('data-type');
                mui(vars.selected_div + ' .mask')[0].style.display = 'block'
            })
            //点击隐藏蒙层
            mui('#all_divs').on('tap', '.mask', function() {
                mask_hidden(this)
            })
            //点击蒙层选择条件
            mui('.mask_list').on('tap', 'div', function() {
                var model = this.getAttribute('data-ly');
                mui(vars.selected_div)[0].setAttribute('data-model', model);
                mui(vars.selected_div + ' .total-type')[0].innerText = this.innerText;
                mui(vars.selected_div + ' .under-L')[0].innerText = '';
                init_fn();
                mui(vars.selected_div + ' .under-L')[0].style.width = '0'
                ajax_L(function() {
                    ajax_R()
                })
            })

            //跳转
            mui('#all_divs').on('tap', '.list-row', function() {
                var name = this.getAttribute('data-name');
                var id = this.getAttribute('data-id');
                if(vars.selected_div == '#ry_div') {
                    var datas = {
                        gs_id: vars.gs_id,
                        name: name,
                    };
                    open_window('../../search/person_search/search_detail.html', 'search_detail', datas)
                } else if(vars.selected_div == '#zj_div') { //在建项目
                    var datas = {
                        gs_id: vars.gs_id,
                        yj_id: id,
                        model: 'JstYj'
                    };
                    open_window()
                } else if(vars.selected_div == '#yj_div') { //业绩信息
                    var model = mui(vars.selected_div + ' .under-L div')[0].getAttribute('data-ly');
                    var datas = {
                        gs_id: vars.gs_id,
                        yj_id: id,
                        model: model
                    };
                    open_window()
                } else if(vars.selected_div == '#zb_div' || vars.selected_div == '#syyj_div') { //中标信息
                    var datas = {
                        xmid: id,
                        condition: 1,
                        xmmc: name,
                        gs_id: vars.gs_id
                    };
                    open_window('../../search/companyYj/yj_info.html', 'yj_info.html', datas)
                }
            })
            //删除class
            function add_remove_class(div, sign) {
                div.each(function() {
                    var self = this.getAttribute('data-type');
                    if(sign != self) {
                        this.classList.remove('selected')
                    } else {
                        this.classList.add('selected')
                    }
                })
            }
            //显示div
            function hied_show_div(div, sign) {
                div.each(function() {
                    var self = this.id;
                    if(self != sign) {
                        this.style.display = 'none'
                    } else {
                        this.style.display = 'flex'
                    }
                })
            }
            //隐藏蒙层
            function mask_hidden(mask_) {
                mask_.style.display = 'none'
            }
            //显示蒙层
            function mask_show(mask_id) {
                mui('#' + mask_id)[0].style.display = 'block'
            }

            function scroll_fn(e) {
                var allH = e.scrollHeight;
                var offH = e.offsetHeight;
                var scrollT = e.scrollTop;
                console.log(e.offsetHeight + '::' + e.scrollHeight + '::' + e.scrollTop);
                var count = mui(vars.selected_div + ' .total-num')[0].getAttribute('data-num');
                var list_l = mui(vars.selected_div + ' .list-row').length;
                if(count == list_l) {
                    mui(vars.selected_div + ' .wait-text')[0].innerText = '没有更多的结果了'
                } else {
                    //滚动到95的地方自动加载且上一次已经加载完成且出现了滚动条
                    if((offH + scrollT) / allH * 100 > 95 && vars.ajax_R_pass && e.scrollTop != 0) {
                        vars.ajax_R_pass = false;
                        ajax_R();
                    }
                }
            }

            //请求统计数据上部分
            function ajax_T(fn) {
                ajax_fn(vars.ajax_url_T, {
                    gs_id: vars.gs_id,
                    token: vars.token
                }, function(backData) {
                    if(backData.status == 'success') {
                        var lists = '';
                        var pass_count = false;
                        mui.each(backData.result, function(i, v) {
                            var ly = v.model || v.sign
                            if(v.count != 0 && !pass_count) { //为了找到条数不为0的数据
                                pass_count = true;
                                mui(vars.selected_div + ' .total-type')[0].style.display = 'block';
                                mui(vars.selected_div)[0].setAttribute('data-model', ly);
                                mui(vars.selected_div + ' .total-type')[0].innerText = v.title + '(' + v.count + ')条';
                                fn(v)
                            }
                            lists += '<div data-ly="' + ly + '">' + v.title + ' <span>(' + v.count + '条)</span></div>'
                        })
                        mui(vars.selected_div + ' .mask_list')[0].innerHTML = lists
                    }
                })
            }

            //请求统计数据左部分
            function ajax_L(fn) {
                var selected = mui(vars.selected_div)[0];
                var model = selected.getAttribute('data-model');
                var ajaxData = {
                    token: vars.token,
                    gs_id: vars.gs_id
                }
                if(vars.selected_div == '#ry_div') {
                    ajaxData.sign = model
                } else {
                    ajaxData.model = model
                }
                ajax_fn(vars.ajax_url_L, ajaxData, function(backData) {
                    var lists = '';
                    console.log(JSON.stringify(backData))
                    if(!backData.status) {
                        mui(vars.selected_div + ' .under-L')[0].style.width = '2.4rem'
                    } else {
                        var waite = mui(vars.selected_div + ' .wait-text')[0];
                        waite.className = 'no-mwait wait-text'
                        waite.innerText = '暂无数据'
                    }
                    mui.each(backData.data, function(i, v) {
                        var ly = backData.model || backData.sign
                        if(i == 0) {
                            mui(vars.selected_div)[0].setAttribute('data-name', v)
                            lists += '<div data-ly="' + ly + '" data-type="' + v + '" class="selected">' + v + '</div>'
                            fn(v);
                        } else {
                            lists += '<div data-ly="' + ly + '" data-type="' + v + '">' + v + '</div>'
                        }
                    })
                    mui(vars.selected_div + ' .under-L')[0].innerHTML = lists
                })
            }

            //请求数据右部分列表
            function ajax_R(fn) {
                var selected = mui(vars.selected_div)[0];
                var model = selected.getAttribute('data-model');
                var name = selected.getAttribute('data-name');
                var page = selected.getAttribute('data-page');
                var ajaxData = {
                    token: vars.token,
                    page: page,
                    rows: 10,
                    gs_id: vars.gs_id,
                }
                if(vars.selected_div == '#ry_div') {
                    ajaxData.sign = model;
                    ajaxData.type = name;
                } else {
                    ajaxData.model = model;
                    ajaxData.nav = name;
                }
                ajax_fn(vars.ajax_url_R, ajaxData, function(backData) {
                    vars.ajax_R_pass = true;
                    if(backData.status == 'success') {
                        var mywait = mui(vars.selected_div + ' .wait-text')[0];
                        mywait.className = 'mwait wait-text';
                        mywait.innerText = '正在努力加载中...';
                        if(backData.count < 8) {
                            mywait.style.display = 'none'
                        }
                        mui(vars.selected_div)[0].setAttribute('data-page', parseInt(ajaxData.page) + 1)
                        var lists = '';
                        var wait_text = mui(vars.selected_div + ' .total-num')[0];
                        wait_text.innerText = '共' + backData.count + '条';
                        wait_text.setAttribute('data-num', backData.count)
                        mui.each(backData.result, function(i, v) {
                            lists += '<div class="list-row" data-name="' + v.name + '" data-id="' + v.id + '">' +
                                '<div class="content-title">' + v.name + '</div>' +
                                '<div class="top-content">';
                            mui.each(v.rows, function(i, v) {
                                lists += '<div class="content-row flex_row">' +
                                    '<div class="content-L">' + v.name + ':</div>' +
                                    '<div class="flex_1">' + v.value + '</div>' +
                                    '</div>'
                            })
                            lists += '</div>' +
                                '</div>'
                        })
                        mui(vars.selected_div + ' .under-R-list')[0].innerHTML += lists
                    } else {
                        var waite = mui(vars.selected_div + ' .wait-text')[0];
                        waite.className = 'no-mwait wait-text'
                        waite.innerText = '暂无数据'
                    }
                })
            }

            //重置参数
            function init_fn() {
                mui(vars.selected_div)[0].setAttribute('data-page', 1);
                mui(vars.selected_div + ' .total-num')[0].innerText = '共?条';
                mui(vars.selected_div + ' .under-R-list')[0].innerHTML = '';
                var wait = mui(vars.selected_div + ' .wait-text')[0];
                wait.innerText = '正在努力加载中...';
                wait.style.display = 'block';
                wait.className = 'loadingWait wait-text'
            }

            function ajax_fn(url, datas, fn) {
                $.ajax(app_url + url, {
                    data: datas,
                    dataType: 'json', //服务器返回json格式数据
                    type: 'post', //HTTP请求类型
                    timeout: 10000, //超时时间设置为10秒
                    success: function(back) {
                        fn(back)
                    },
                    error: function(xhr, type, errorThrown) {
                        //异常处理；
                        mui.toast('出错啦~请稍候重试');
                        //                      plus.nativeUI.closeWaiting();
                    }
                })
            }

            function toggle_text(self) {
                var inner_t = self.innerText;
                var all_t = self.getAttribute('data-allText')
                var sub_t = self.getAttribute('data-subText')
                if(inner_t == '全文') {
                    self.parentNode.innerHTML = all_t + ' <span onclick="toggle_text(this)" data-subText="' + sub_t + '" data-allText="' + all_t + '" style="color:#45a4fc">收起</span>'
                } else {
                    self.parentNode.innerHTML = sub_t + '... <span onclick="toggle_text(this)" data-subText="' + sub_t + '" data-allText="' + all_t + '" style="color:#45a4fc">全文</span>'
                }
            }
        </script>
    </body>

</html>